﻿using System.Collections.Generic;
using IoCTechDay.HollywoodPrinciple;

namespace IoCTechDay.DependencyInjection
{
    public class DependentHollywoodDirector
    {
        private readonly List<IActor> _actors;

        public DependentHollywoodDirector(List<IActor> actorsToWorkWith)
        {
            _actors = actorsToWorkWith;
        }

        public void Action()
        {
            foreach (var actor in _actors)
            {
                actor.Act();
            }
        }

        public void Cut()
        {
            foreach (var actor in _actors)
            {
                actor.Cut();
            }
        }
    }
}